<?php $this->render("header.php");?>
    <!-- 内页子菜单-->
    <div class="nav_inner l">
    	<h2><?php echo $this->typename;?></h2>
        <ul>
        <?php
        $subtypename = "";
        foreach ($this->types[$this->cname] as $v){
        	$current = "";
        	if ($v['id'] == $this->typeid){
        		$current = 'class="current"';
        		$subtypename = $v['name'];
        	}
        	if ($v['isleaf'])
        		$url = $this->url($this->baseUrl, $this->cname, "show", "id=" . $v['leafid']);
        	else
        		$url = $this->url($this->baseUrl, $this->cname, "list", "id=" . $v['id']);
        	        	
        			if ($v['id'] == $this->typeid){
	    		echo "<li {$current}><a href=\"{$url}\">{$v['name']}</a>
	    		<ul class=\"list_scholar\">";
	    		foreach($this->arr_type[$v['id']] as $vv){
	    			$aurl = $this->url($this->baseUrl, "zzjg", "show", "id=" . $vv['aid']);
	    			echo "<li><a href=\"{$aurl}\">{$vv['title']}</a></li>";
	    		}
	    		echo "</ul></li>";
        	}else{
        		echo "<li {$current}><a href=\"{$url}\">{$v['name']}</a></li>";
        	}
        }?>
        </ul>
             <div class="nav_inner_b oh"></div>
             		<div class="flink">
				<select onchange="if (this.value != '')window.open(this.value);">
				<option value="" selected="selected">+Quick Links</option>
				<?php
				foreach ($this->links as $v){
					echo "<option value=\"{$v['url']}\">{$v['name']}</option>";
				}
				?>				          
                  </select>
		</div>
    </div>
    <!-- /内页子菜单-->
    
	<!-- newslist-->
    <div class="inner l">
 
    	<div class="title_inner"><h3><?php echo $subtypename;?></h3>
			<div class="pos r"><a href="<?php echo $this->fullUrl;?>/">Home</a>&lt;<span><?php echo $this->typename;?></span></div>
        </div>
      <div class="con_inner">
    	<ul class="ul_newslist">
    	<?php
    	foreach ($this->list as $v){
    		$url = $this->url($this->baseUrl, "$this->cname", "show", "id=" . $v['aid']);
    		$v['pubtime'] = substr($v['pubtime'], 0, 10);
    		if ($v['pubtime'] != '0000-00-00'){
    			$str_time = "<span class=\"r\">[{$v['pubtime']}]</span>";
    		}else{
    			$str_time = "";
    		}
    		echo <<<EOT
<li>
<a href="{$url}">{$v['title']}</a>
$str_time
</li>
EOT;
    	}
    	?>
        </ul> 
        
		<!--分页控制 开始-->
		<div class="pageNum">
<?php
$ext = '&id=' . $this->typeid;
$indexurl =$this->url($this->baseUrl, $this->cname, 'list', 'nowp=1' . $ext);
$lasturl = $this->url($this->baseUrl, $this->cname, 'list', 'nowp=' . $this->page['totalpage'] . $ext);
print <<<EOT
<a href="{$indexurl}" title="First Page" class="bg_pageNum">First Page</a> <span>
EOT;
foreach ($this->pagenum as $v) {
    $url =$this->url($this->baseUrl, $this->cname, 'list', 'nowp=' . $v . $ext);
    if ($v == $this->page['nowp'])
        echo '<a href="' . $url . '" class="current">' . $v . '</a>';
    else
        echo '<a href="' . $url . '">' . $v . '</a>';
}
print <<<EOT
</span><a href="{$lasturl}" title="Last Page" class="bg_pageNum">Last Page</a>
EOT;
?>
		</div>
		<!--分页控制 结束-->  
        
		  <div class="inner_b oh"></div>  
        </div>
         
    </div>
	<!-- /newslist-->
<?php $this->render("footer.php");?>